<html>
<head><meta charset="utf-8"><title>Rust-analyzer and vim/neo-vim · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html">Rust-analyzer and vim/neo-vim</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="164928146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/164928146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#164928146">(May 05 2019 at 17:21)</a>:</h4>
<p>Has someone tried using RA with nvim? Can they please share how they are using it ?</p>



<a name="164942306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/164942306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hoang Luu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#164942306">(May 05 2019 at 23:40)</a>:</h4>
<p>I'm using it with <a href="https://github.com/autozimu/LanguageClient-neovim" target="_blank" title="https://github.com/autozimu/LanguageClient-neovim">https://github.com/autozimu/LanguageClient-neovim</a> atm, it doesn't support all features of RA yet, but still usable</p>



<a name="164942566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/164942566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hoang Luu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#164942566">(May 05 2019 at 23:48)</a>:</h4>
<p>just change config to:</p>
<div class="codehilite"><pre><span></span>let g:LanguageClient_serverCommands = {
    \ &#39;rust&#39;: [&#39;rustup&#39;, &#39;run&#39;, &#39;stable&#39;, &#39;ra_lsp_server&#39;],
    \ }
</pre></div>



<a name="164947681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/164947681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#164947681">(May 06 2019 at 02:15)</a>:</h4>
<p>Thanks <span class="user-mention" data-user-id="218869">@Hoang Luu</span></p>



<a name="164947800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/164947800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hoang Luu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#164947800">(May 06 2019 at 02:18)</a>:</h4>
<p>I’m also investigating on adding custom features of RA like syntaxTree to vim as well</p>



<a name="164947802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/164947802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hoang Luu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#164947802">(May 06 2019 at 02:18)</a>:</h4>
<p>We could share configs here</p>



<a name="164948317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/164948317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> qmx <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#164948317">(May 06 2019 at 02:32)</a>:</h4>
<p>I'm interested as well</p>



<a name="165033919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165033919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165033919">(May 07 2019 at 01:23)</a>:</h4>
<blockquote>
<p>We could share configs here</p>
</blockquote>
<p>That would be awesome <span class="user-mention" data-user-id="218869">@Hoang Luu</span></p>



<a name="165053108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165053108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165053108">(May 07 2019 at 08:42)</a>:</h4>
<p>We have some VIM config here: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/769#issuecomment-463524385" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/769#issuecomment-463524385">https://github.com/rust-analyzer/rust-analyzer/issues/769#issuecomment-463524385</a></p>



<a name="165053120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165053120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165053120">(May 07 2019 at 08:42)</a>:</h4>
<p>We have a <code>docs/user</code> folder, adding an <code>vim.md</code> there would be very appreciated ;)</p>



<a name="165053615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165053615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165053615">(May 07 2019 at 08:52)</a>:</h4>
<p><span class="user-mention" data-user-id="133169">@matklad</span> while using rust-analyzer with languageclient-neovim, it's really slow to load the workspace with 450 packages, it takes me almost 45-60 seconds.</p>



<a name="165053658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165053658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165053658">(May 07 2019 at 08:53)</a>:</h4>
<p><span class="user-mention" data-user-id="116773">@csmoe</span> yeah, initial load is expected to be slowish</p>



<a name="165053693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165053693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165053693">(May 07 2019 at 08:54)</a>:</h4>
<p>We definitely could optimize this more or cache workspaces across restarts, but this hansn't been done yet</p>



<a name="165225087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165225087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165225087">(May 09 2019 at 05:19)</a>:</h4>
<blockquote>
<p>We have some VIM config here: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/769#issuecomment-463524385" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/769#issuecomment-463524385">https://github.com/rust-analyzer/rust-analyzer/issues/769#issuecomment-463524385</a></p>
</blockquote>
<p><span class="user-mention" data-user-id="124920">@Jean Mertz</span>  link in   <span class="user-mention" data-user-id="133169">@matklad</span> 's suggestion is not working for me. It gives me error if the line of rust is not complete, but does not give me suggestion in snippet. Deoplete suggests words already in the file which vim already does with ctrl+n. But I am expecting if I write, as shown in the gif in the comment, <code>std::me</code> then it suggests mem etc.</p>



<a name="165225160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165225160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jean Mertz <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165225160">(May 09 2019 at 05:21)</a>:</h4>
<p>FYI, I’m working on improving RA support in Vim, see (for starters): <a href="https://github.com/autozimu/LanguageClient-neovim/pull/815" target="_blank" title="https://github.com/autozimu/LanguageClient-neovim/pull/815">https://github.com/autozimu/LanguageClient-neovim/pull/815</a></p>



<a name="165225205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165225205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165225205">(May 09 2019 at 05:22)</a>:</h4>
<p>huh ! it does not do that for me in vs-code either.</p>



<a name="165225218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165225218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165225218">(May 09 2019 at 05:22)</a>:</h4>
<blockquote>
<p>FYI, I’m working on improving RA support in Vim, see (for starters): <a href="https://github.com/autozimu/LanguageClient-neovim/pull/815" target="_blank" title="https://github.com/autozimu/LanguageClient-neovim/pull/815">https://github.com/autozimu/LanguageClient-neovim/pull/815</a></p>
</blockquote>
<p><span class="user-mention" data-user-id="124920">@Jean Mertz</span>  Thank you sir. Very much appreciate that.</p>



<a name="165225279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165225279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jean Mertz <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165225279">(May 09 2019 at 05:24)</a>:</h4>
<p>I’ll see if I can get my Vim config online sometime this weekend.</p>



<a name="165225293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165225293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jean Mertz <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165225293">(May 09 2019 at 05:25)</a>:</h4>
<p>Also, if you want to see how I use Vim + RA (and compare that to how things are working for you), I record myself working on Rust projects, using Vim and RA here: <a href="https://www.youtube.com/channel/UCj00KMrSJjHRL2F75ERgHXA" target="_blank" title="https://www.youtube.com/channel/UCj00KMrSJjHRL2F75ERgHXA">https://www.youtube.com/channel/UCj00KMrSJjHRL2F75ERgHXA</a></p>
<div class="youtube-video message_inline_image"><a data-id="channel" href="https://www.youtube.com/channel/UCj00KMrSJjHRL2F75ERgHXA" target="_blank" title="https://www.youtube.com/channel/UCj00KMrSJjHRL2F75ERgHXA"><img src="https://i.ytimg.com/vi/channel/default.jpg"></a></div>



<a name="165225340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165225340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jean Mertz <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165225340">(May 09 2019 at 05:26)</a>:</h4>
<p>(I’ve got some episodes of me working on the LanguageClient Pull Request I mentioned above, that I haven’t edited/uploaded yet)</p>



<a name="165251011"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/165251011" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> blitzerr <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#165251011">(May 09 2019 at 13:16)</a>:</h4>
<p><span class="user-mention" data-user-id="124920">@Jean Mertz</span>  thanks a lot for the link and video. Your vimconfig will be greatly appreciated</p>



<a name="167535804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/167535804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Peter K <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#167535804">(Jun 07 2019 at 00:46)</a>:</h4>
<p>Hello! Has anybody managed to make rust-analyzer work with coc.nvim instead of LanguageClient-neovim?</p>



<a name="167535948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/167535948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> csmoe <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#167535948">(Jun 07 2019 at 00:50)</a>:</h4>
<p><span class="user-mention" data-user-id="224458">@Peter K</span> check out the user doc in the repo</p>



<a name="167536234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer%20and%20vim/neo-vim/near/167536234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Peter K <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Rust-analyzer.20and.20vim.2Fneo-vim.html#167536234">(Jun 07 2019 at 00:56)</a>:</h4>
<p>I did that and coc runs the ra server alright, but after that I'm lost. I was curious if somebody had a working config to steal</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>